{"ast":null,"code":"var _jsxFileName = \"/data/messenger.client/src/components/ContactItem/index.tsx\";\nimport React from 'react';\nimport classNames from \"classnames\";\nimport { UserItem } from \"../index\";\nimport './ContactItem.scss';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\nconst ContactItem = props => {\n  if (props.addRequest) {\n    return /*#__PURE__*/_jsxDEV(\"div\", {\n      className: classNames(\"contacts__item\", \"contacts__item-add-requests\"),\n      children: [props.currentUser.id === props.contact.toUser.id && /*#__PURE__*/_jsxDEV(UserItem, {\n        profile: props.contact.fromUser\n      }, void 0, false, {\n        fileName: _jsxFileName,\n        lineNumber: 13,\n        columnNumber: 25\n      }, this) || /*#__PURE__*/_jsxDEV(UserItem, {\n        profile: props.contact.toUser\n      }, void 0, false, {\n        fileName: _jsxFileName,\n        lineNumber: 15,\n        columnNumber: 21\n      }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n        className: \"contacts__item-control\",\n        children: [/*#__PURE__*/_jsxDEV(\"button\", {\n          className: classNames(\"contacts__item-control-button\", \"contacts__item-control-button-cancel\")\n        }, void 0, false, {\n          fileName: _jsxFileName,\n          lineNumber: 18,\n          columnNumber: 21\n        }, this), /*#__PURE__*/_jsxDEV(\"button\", {\n          className: classNames(\"contacts__item-control-button\", \"contacts__item-control-button-accept\")\n        }, void 0, false, {\n          fileName: _jsxFileName,\n          lineNumber: 20,\n          columnNumber: 21\n        }, this)]\n      }, void 0, true, {\n        fileName: _jsxFileName,\n        lineNumber: 17,\n        columnNumber: 17\n      }, this)]\n    }, void 0, true, {\n      fileName: _jsxFileName,\n      lineNumber: 11,\n      columnNumber: 13\n    }, this);\n  } else if (props.sentRequest) {\n    return /*#__PURE__*/_jsxDEV(\"div\", {\n      className: classNames(\"contacts__item\", \"contacts__item-sent-requests\"),\n      children: [props.currentUser.id === props.contact.toUser.id && /*#__PURE__*/_jsxDEV(UserItem, {\n        profile: props.contact.fromUser\n      }, void 0, false, {\n        fileName: _jsxFileName,\n        lineNumber: 29,\n        columnNumber: 25\n      }, this) || /*#__PURE__*/_jsxDEV(UserItem, {\n        profile: props.contact.toUser\n      }, void 0, false, {\n        fileName: _jsxFileName,\n        lineNumber: 31,\n        columnNumber: 21\n      }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n        className: \"contacts__item-control\",\n        children: /*#__PURE__*/_jsxDEV(\"button\", {\n          className: classNames(\"contacts__item-control-button\", \"contacts__item-control-button-cancel\")\n        }, void 0, false, {\n          fileName: _jsxFileName,\n          lineNumber: 34,\n          columnNumber: 21\n        }, this)\n      }, void 0, false, {\n        fileName: _jsxFileName,\n        lineNumber: 33,\n        columnNumber: 17\n      }, this)]\n    }, void 0, true, {\n      fileName: _jsxFileName,\n      lineNumber: 27,\n      columnNumber: 13\n    }, this);\n  } else {\n    return /*#__PURE__*/_jsxDEV(\"div\", {\n      className: classNames(\"contacts__item\", \"contacts__item-all-accepted\"),\n      children: /*#__PURE__*/_jsxDEV(\"div\", {\n        className: \"contacts__item-container\",\n        children: props.currentUser.id === props.contact.toUser.id && /*#__PURE__*/_jsxDEV(UserItem, {\n          profile: props.contact.fromUser\n        }, void 0, false, {\n          fileName: _jsxFileName,\n          lineNumber: 44,\n          columnNumber: 29\n        }, this) || /*#__PURE__*/_jsxDEV(UserItem, {\n          profile: props.contact.toUser\n        }, void 0, false, {\n          fileName: _jsxFileName,\n          lineNumber: 46,\n          columnNumber: 25\n        }, this)\n      }, void 0, false, {\n        fileName: _jsxFileName,\n        lineNumber: 42,\n        columnNumber: 17\n      }, this)\n    }, void 0, false, {\n      fileName: _jsxFileName,\n      lineNumber: 41,\n      columnNumber: 13\n    }, this);\n  }\n};\n_c = ContactItem;\nexport default ContactItem;\nvar _c;\n$RefreshReg$(_c, \"ContactItem\");","map":{"version":3,"names":["React","classNames","UserItem","ContactItem","props","addRequest","currentUser","id","contact","toUser","fromUser","sentRequest"],"sources":["/data/messenger.client/src/components/ContactItem/index.tsx"],"sourcesContent":["import React from 'react';\nimport classNames from \"classnames\";\nimport {ContactItemProps} from \"../../models/props/ContactItemProps\";\nimport {UserItem} from \"../index\";\nimport './ContactItem.scss';\n\nconst ContactItem: React.FC<ContactItemProps> = (props) => {\n\n    if (props.addRequest) {\n        return (\n            <div className={classNames(\"contacts__item\", \"contacts__item-add-requests\")}>\n                {(props.currentUser.id === props.contact.toUser.id &&\n                        <UserItem profile={props.contact.fromUser} />\n                    ) ||\n                    <UserItem profile={props.contact.toUser} />\n                }\n                <div className=\"contacts__item-control\">\n                    <button className={classNames(\"contacts__item-control-button\",\n                        \"contacts__item-control-button-cancel\")} />\n                    <button className={classNames(\"contacts__item-control-button\",\n                        \"contacts__item-control-button-accept\")} />\n                </div>\n            </div>\n        );\n    } else if (props.sentRequest) {\n        return (\n            <div className={classNames(\"contacts__item\", \"contacts__item-sent-requests\")}>\n                {(props.currentUser.id === props.contact.toUser.id &&\n                        <UserItem profile={props.contact.fromUser} />\n                    ) ||\n                    <UserItem profile={props.contact.toUser} />\n                }\n                <div className=\"contacts__item-control\">\n                    <button className={classNames(\"contacts__item-control-button\",\n                        \"contacts__item-control-button-cancel\")} />\n                </div>\n            </div>\n        );\n    } else {\n        return (\n            <div className={classNames(\"contacts__item\", \"contacts__item-all-accepted\")}>\n                <div className=\"contacts__item-container\">\n                    {(props.currentUser.id === props.contact.toUser.id &&\n                            <UserItem profile={props.contact.fromUser} />\n                        ) ||\n                        <UserItem profile={props.contact.toUser} />\n                    }\n                </div>\n            </div>\n        );\n    }\n}\n\nexport default ContactItem;"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,UAAU,MAAM,YAAY;AAEnC,SAAQC,QAAQ,QAAO,UAAU;AACjC,OAAO,oBAAoB;AAAC;AAE5B,MAAMC,WAAuC,GAAIC,KAAK,IAAK;EAEvD,IAAIA,KAAK,CAACC,UAAU,EAAE;IAClB,oBACI;MAAK,SAAS,EAAEJ,UAAU,CAAC,gBAAgB,EAAE,6BAA6B,CAAE;MAAA,WACtEG,KA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